import { defineStore } from 'pinia'

export const useCustomerPaginationStore = defineStore('customerPagination', {
    state: () => ({
        pagination: {
            current: 1,
            size: 10,
            total: 0
        }
    }),
    actions: {
        updateCurrentPage(page) {
            this.pagination.current = page
        },
        updatePageSize(size) {
            this.pagination.size = size
        },
        updateTotal(total) {
            this.pagination.total = total
        },
        resetPagination() {
            this.pagination = {
                current: 1,
                size: 10,
                total: 0
            }
        }
    }
})